//
//  NSNumber+String.m
//  FreightAssistant
//
//  Created by Mac mini on 15/12/11.
//  Copyright © 2015年 leo. All rights reserved.
//

#import "NSNumber+String.h"

@implementation NSNumber (String)

- (NSUInteger)length {
    
    if (self == nil) {
        return 0;
    }
    else {
        NSString * string = [NSString stringWithFormat: @"%@", self];
        return string.length;
    }
}

- (BOOL)isEqualToString:(NSString *)aString {
    
    if (self == nil) {
        return false;
    }
    else {
        NSString * string = [NSString stringWithFormat: @"%@", self];
        return [string isEqualToString: aString];
    }
}

@end
